package org.jivesoftware.smackx.packet;

import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.provider.PacketExtensionProvider;
import org.xmlpull.v1.XmlPullParser;

public class Nick
  implements PacketExtension
{
  public static final String NAMESPACE = "http://jabber.org/protocol/nick";
  public static final String ELEMENT_NAME = "nick";
  private String name = null;

  public Nick(String paramString)
  {
    this.name = paramString;
  }

  public String getName()
  {
    return this.name;
  }

  public void setName(String paramString)
  {
    this.name = paramString;
  }

  public String getElementName()
  {
    return "nick";
  }

  public String getNamespace()
  {
    return "http://jabber.org/protocol/nick";
  }

  public String toXML()
  {
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append("<").append("nick").append(" xmlns=\"").append("http://jabber.org/protocol/nick").append("\">");
    localStringBuilder.append(getName());
    localStringBuilder.append("</").append("nick").append('>');
    return localStringBuilder.toString();
  }

  public static class Provider
    implements PacketExtensionProvider
  {
    public PacketExtension parseExtension(XmlPullParser paramXmlPullParser)
      throws Exception
    {
      paramXmlPullParser.next();
      String str = paramXmlPullParser.getText();
      while (paramXmlPullParser.getEventType() != 3)
        paramXmlPullParser.next();
      return new Nick(str);
    }
  }
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     org.jivesoftware.smackx.packet.Nick
 * JD-Core Version:    0.6.1
 */